/*
 * Copyright © 2004-2014 chenYuan. All rights reserved.
 * @Website:wwww.jspx.net
 * @Mail:39793751@qq.com
 * @author: chenYuan , 陈原
 * @License: Jspx.net Framework Code is open source (LGPL)，Jspx.net Framework 使用LGPL 开源授权协议发布。
 * @jvm:jdk1.6+  x86/amd64
 *
 */
package com.jspx.txweb.table;

import com.jspx.sober.annotation.Column;
import com.jspx.sober.annotation.IDType;
import com.jspx.sober.annotation.Id;
import com.jspx.sober.annotation.Table;
import com.jspx.sober.table.OperateTable;

import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: chenYuan
 * Date: 12-1-13
 * Time: 下午2:52
 */
@Table(name = "jspx_login_log", caption = "登录历史记录表")
public class LoginLog extends OperateTable {

    @Id(auto = true, type = IDType.serial)
    @Column(caption = "ID", notNull = true)
    private long id;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Column(caption = "名称", length = 50,notNull = true)
    private String sessionId = null;

    //登录客户端方式，app:开放接口;web:网页;weiXin:微信
    @Column(caption = "名称", length = 20, defaultValue = "web")
    private String client = "web";

    public String getClient() {
        return client;
    }

    public void setClient(String client) {
        this.client = client;
    }

    //记录的是第几次登录
    @Column(caption = "登录次数", notNull = true)
    private long loginTimes = 0;

    @Column(caption = "应用ID", notNull = true)
    private long appId = 0;

    @Column(caption = "排序", notNull = true)
    private int sortType = 0;

    @Column(caption = "排序日期", notNull = true)
    private Date sortDate = new Date();

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public long getLoginTimes() {
        return loginTimes;
    }

    public void setLoginTimes(long loginTimes) {
        this.loginTimes = loginTimes;
    }

    public long getAppId() {
        return appId;
    }

    public void setAppId(long appId) {
        this.appId = appId;
    }

    public int getSortType() {
        return sortType;
    }

    public void setSortType(int sortType) {
        this.sortType = sortType;
    }

    public Date getSortDate() {
        return sortDate;
    }

    public void setSortDate(Date sortDate) {
        this.sortDate = sortDate;
    }
}